Skip to content

[TVM FFI] Support __tvm_ffi_env_stream__ protocol#75193

Merged
SigureMo merged 3 commits intoPaddlePaddle:developfrom
cattidea:tvm-ffi/support-tvm-ffi-env-stream-protocol
Sep 11, 2025
Merged

[TVM FFI] Support __tvm_ffi_env_stream__ protocol#75193
SigureMo merged 3 commits intoPaddlePaddle:developfrom
cattidea:tvm-ffi/support-tvm-ffi-env-stream-protocol

Conversation

@SigureMo
Copy link
Copy Markdown
Member

@SigureMo SigureMo commented Sep 9, 2025

PR Category

Execute Infrastructure

PR Types

New features

Description

Add __tvm_ffi_env_stream__ protocol support. This interface was proposed at apache/tvm#18293 and implemented at apache/tvm#18295 to enable TVM FFI to retrieve stream context from Tensor.

This PR has been tested on https://github.com/apache/tvm/blob/485a309dcdd9044d252b52aee81c07fa1c62dfa7/ffi/examples/quick_start/run_example.py#L54

@paddle-bot
Copy link
Copy Markdown

paddle-bot bot commented Sep 9, 2025

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

gouzil
gouzil previously approved these changes Sep 10, 2025
else:
# TODO: Add XPU and custom device support.
raise RuntimeError(
"Currently, the __tvm_ffi_env_stream__ method is only supported for GPU tensors."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPU --> CUDA?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIP 应该也支持?

@SigureMo SigureMo merged commit 65cbe54 into PaddlePaddle:develop Sep 11, 2025
209 of 224 checks passed
@SigureMo SigureMo deleted the tvm-ffi/support-tvm-ffi-env-stream-protocol branch September 11, 2025 00:58
zrr1999 pushed a commit to zrr1999/Paddle that referenced this pull request Sep 11, 2025
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@bd707ef). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop   #75193   +/-   ##
==========================================
  Coverage           ?        0           
==========================================
  Files              ?        0           
  Lines              ?        0           
  Branches           ?        0           
==========================================
  Hits               ?        0           
  Misses             ?        0           
  Partials           ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants